package com.glasgowrax.hack.domain.directions;

import org.json.JSONException;
import org.json.JSONObject;


public class Vehicle {
	
	private String name;
	private String type;
	private String icon;
	
	public Vehicle(JSONObject json) {		
		try {
			name = (json.has("name")) ? json.getString("name") : "";	
			type = (json.has("type")) ? json.getString("type") : "";
			icon = (json.has("icon")) ? json.getString("icon") : "";
			
		} catch (JSONException e) {
			e.printStackTrace();
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}
	
}
